package cn.clx.basic.util;

import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;

/**
 * 简单邮件的工具类
 */
public class EmailUtil {


    private static JavaMailSender javaMailSender= SpringApplicationUtil.getContext().getBean(JavaMailSender.class);


    public static void sendMessage(String Eamil,Long id){
        SimpleMailMessage message = new SimpleMailMessage();
        message.setFrom("1498467577@qq.com");
        message.setTo(Eamil);
        message.setSubject("宠物乐园-店铺入驻激活请求");
        message.setText("亲，您的店铺信息已经通过审核，请尽快完成激活并使用：" +
                "激活链接：http://localhost:8080/shop/activation/"+id);
        javaMailSender.send(message);
    }

}
